package com.zpz.framework.zpzoauth.dao;

import com.zpz.framework.zpzoauth.common.dao.ZpzOauthBaseMapper;
import com.zpz.framework.zpzoauth.pojo.pe.MemberRolePe;
import com.zpz.framework.zpzoauth.pojo.po.FrameRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author zhangpanzhi
 * @time 2019-07-09
 * @description 未经本人允许请勿随便改动，尊重劳动
 * */
public interface ZpzOauthFrameRoleMapper extends ZpzOauthBaseMapper<FrameRole> {
    List<String> selectRoleByClientAndUser(@Param("clientId") String clientId, @Param("userCode") String userCode);
    List<String> selectDepartmentByUesr(@Param("userCode") String userCode);

    FrameRole getRoleByRoleCode(@Param("roleCode")String roleCode);
    int addRole(FrameRole role);
    /**
     * 根据角色名称获取角色信息
     */
    FrameRole checkRoleName(@Param("roleName") String roleName);

    int modifyRole(FrameRole role);

    /**
     * @name: getRoleDropdownList
     * @description:获取角色下拉列表信息
     * @returnType: java.util.List<com.auyan.framework.users.model.vo.RoleDropdownListVo>
     * @createBy: changyifan
     * @createDate: 2019-05-16 05:41:48
     * @updateBy:
     * @updateDate:
     * @param: []
     * @throws Exception
     */
    List<FrameRole> selectRoleDropdownList(@Param("clientId") String clientId) throws Exception;

    /**
     * @name: uopdateRoleState
     * @description:修改角色启用状态
     * @returnType: com.auyan.framework.common.result.ResultMsg<java.lang.Boolean>
     * @createBy: changyifan
     * @createDate: 2019-05-17 02:00:45
     * @updateBy:
     * @updateDate:
     * @param: [roleStateQo]
     * @throws Exception
     */
    Boolean updateRoleState(FrameRole frameRole) throws Exception;
    /** @Author fengxm
     * @NAME 查询角色管理列表
     * @Description //TODO
     * @Date 2019/5/17 14:11
     * @param
     * @return com.github.pagehelper.PageInfo<com.auyan.framework.users.model.vo.RoleManageVo>
     */
    List<FrameRole> selectRoleMangePageList(Map myPrarm);
    /**
     * @Author fengxm
     * @NAME deleteRoleInfo
     * @Description //TODO
     * @Date 2019/5/20 10:51
    * @param frameRole
     * @return com.auyan.framework.common.result.ResultMsg<java.lang.Boolean>
     */
    Integer deleteRoleInfo(FrameRole frameRole);

    /**
     * 查询成员信息
     * @param model
     * @return
     */
    MemberRolePe findMemberRolePe(MemberRolePe model);
}
